s/assert_session_desc_(not_)equals/assert_session_desc_(not_)similar bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1461712 gecko-commit: 14fb6876d99650f5fbcca42c000703fc198abe59 gecko-integration-branch: central gecko-reviewers: bwc
diff --git a/webrtc/RTCPeerConnection-createOffer.html b/webrtc/RTCPeerConnection-createOffer.html index 936fd05..2fa3a05 100644 --- a/webrtc/RTCPeerConnection-createOffer.html +++ b/webrtc/RTCPeerConnection-createOffer.html
@@ -15,7 +15,7 @@ // generateAnswer() // countAudioLine() // countVideoLine() - // assert_session_desc_equals() + // assert_session_desc_similar() /* * 4.3.2. createOffer() @@ -54,8 +54,8 @@ pc.setLocalDescription(offer) .then(() => { assert_equals(pc.signalingState, 'have-local-offer'); - assert_session_desc_equals(pc.localDescription, offer); - assert_session_desc_equals(pc.pendingLocalDescription, offer); + assert_session_desc_similar(pc.localDescription, offer); + assert_session_desc_similar(pc.pendingLocalDescription, offer); assert_equals(pc.currentLocalDescription, null); assert_array_equals(states, ['have-local-offer']); diff --git a/webrtc/RTCPeerConnection-helper.js b/webrtc/RTCPeerConnection-helper.js index f83a590..6107d6d 100644 --- a/webrtc/RTCPeerConnection-helper.js +++ b/webrtc/RTCPeerConnection-helper.js
@@ -93,12 +93,12 @@ } } -function assert_session_desc_equals(sessionDesc1, sessionDesc2) { +function assert_session_desc_similar(sessionDesc1, sessionDesc2) { assert_true(isSimilarSessionDescription(sessionDesc1, sessionDesc2), 'Expect both session descriptions to have the same count of media lines'); } -function assert_session_desc_not_equals(sessionDesc1, sessionDesc2) { +function assert_session_desc_not_similar(sessionDesc1, sessionDesc2) { assert_false(isSimilarSessionDescription(sessionDesc1, sessionDesc2), 'Expect both session descriptions to have different count of media lines'); } diff --git a/webrtc/RTCPeerConnection-setLocalDescription-answer.html b/webrtc/RTCPeerConnection-setLocalDescription-answer.html index 64b6901..4a50456 100644 --- a/webrtc/RTCPeerConnection-setLocalDescription-answer.html +++ b/webrtc/RTCPeerConnection-setLocalDescription-answer.html
@@ -13,7 +13,7 @@ // The following helper functions are called from RTCPeerConnection-helper.js: // generateOffer // generateAnswer - // assert_session_desc_equals + // assert_session_desc_similar /* 4.3.2. Interface Definition @@ -73,11 +73,11 @@ pc.setLocalDescription(answer) .then(() => { assert_equals(pc.signalingState, 'stable'); - assert_session_desc_equals(pc.localDescription, answer); - assert_session_desc_equals(pc.remoteDescription, offer); + assert_session_desc_similar(pc.localDescription, answer); + assert_session_desc_similar(pc.remoteDescription, offer); - assert_session_desc_equals(pc.currentLocalDescription, answer); - assert_session_desc_equals(pc.currentRemoteDescription, offer); + assert_session_desc_similar(pc.currentLocalDescription, answer); + assert_session_desc_similar(pc.currentRemoteDescription, offer); assert_equals(pc.pendingLocalDescription, null); assert_equals(pc.pendingRemoteDescription, null); @@ -105,11 +105,11 @@ pc.setLocalDescription({ type: 'answer' }) .then(() => { assert_equals(pc.signalingState, 'stable'); - assert_session_desc_equals(pc.localDescription, answer); - assert_session_desc_equals(pc.remoteDescription, offer); + assert_session_desc_similar(pc.localDescription, answer); + assert_session_desc_similar(pc.remoteDescription, offer); - assert_session_desc_equals(pc.currentLocalDescription, answer); - assert_session_desc_equals(pc.currentRemoteDescription, offer); + assert_session_desc_similar(pc.currentLocalDescription, answer); + assert_session_desc_similar(pc.currentRemoteDescription, offer); assert_equals(pc.pendingLocalDescription, null); assert_equals(pc.pendingRemoteDescription, null); diff --git a/webrtc/RTCPeerConnection-setLocalDescription-offer.html b/webrtc/RTCPeerConnection-setLocalDescription-offer.html index d8cb813..9502f28 100644 --- a/webrtc/RTCPeerConnection-setLocalDescription-offer.html +++ b/webrtc/RTCPeerConnection-setLocalDescription-offer.html
@@ -12,8 +12,8 @@ // The following helper functions are called from RTCPeerConnection-helper.js: // generateOffer - // assert_session_desc_not_equals - // assert_session_desc_equals + // assert_session_desc_not_similar + // assert_session_desc_similar /* 4.3.2. Interface Definition @@ -67,8 +67,8 @@ pc.setLocalDescription(offer) .then(() => { assert_equals(pc.signalingState, 'have-local-offer'); - assert_session_desc_equals(pc.localDescription, offer); - assert_session_desc_equals(pc.pendingLocalDescription, offer); + assert_session_desc_similar(pc.localDescription, offer); + assert_session_desc_similar(pc.pendingLocalDescription, offer); assert_equals(pc.currentLocalDescription, null); assert_array_equals(states, ['have-local-offer']); @@ -89,8 +89,8 @@ pc.setLocalDescription({ type: 'offer' }) .then(() => { assert_equals(pc.signalingState, 'have-local-offer'); - assert_session_desc_equals(pc.localDescription, offer); - assert_session_desc_equals(pc.pendingLocalDescription, offer); + assert_session_desc_similar(pc.localDescription, offer); + assert_session_desc_similar(pc.pendingLocalDescription, offer); assert_equals(pc.currentLocalDescription, null); })); }, 'setLocalDescription with type offer and null sdp should use lastOffer generated from createOffer'); @@ -126,7 +126,7 @@ .then(offer1 => pc.createOffer({ offerToReceiveVideo: true }) .then(offer2 => { - assert_session_desc_not_equals(offer1, offer2); + assert_session_desc_not_similar(offer1, offer2); return promise_rejects(t, 'InvalidModificationError', pc.setLocalDescription(offer1)); })); @@ -147,10 +147,10 @@ .then(offer2 => pc.setLocalDescription(offer2) .then(offer2 => { - assert_session_desc_not_equals(offer1, offer2); + assert_session_desc_not_similar(offer1, offer2); assert_equals(pc.signalingState, 'have-local-offer'); - assert_session_desc_equals(pc.localDescription, offer2); - assert_session_desc_equals(pc.pendingLocalDescription, offer2); + assert_session_desc_similar(pc.localDescription, offer2); + assert_session_desc_similar(pc.pendingLocalDescription, offer2); assert_equals(pc.currentLocalDescription, null); assert_array_equals(states, ['have-local-offer']); diff --git a/webrtc/RTCPeerConnection-setLocalDescription-pranswer.html b/webrtc/RTCPeerConnection-setLocalDescription-pranswer.html index 8b173c4..a145f95 100644 --- a/webrtc/RTCPeerConnection-setLocalDescription-pranswer.html +++ b/webrtc/RTCPeerConnection-setLocalDescription-pranswer.html
@@ -13,7 +13,7 @@ // The following helper functions are called from RTCPeerConnection-helper.js: // generateOffer // generateAnswer - // assert_session_desc_equals + // assert_session_desc_similar /* 4.3.2. Interface Definition @@ -97,12 +97,12 @@ .then(() => { assert_equals(pc.signalingState, 'have-local-pranswer'); - assert_session_desc_equals(pc.remoteDescription, offer); - assert_session_desc_equals(pc.pendingRemoteDescription, offer); + assert_session_desc_similar(pc.remoteDescription, offer); + assert_session_desc_similar(pc.pendingRemoteDescription, offer); assert_equals(pc.currentRemoteDescription, null); - assert_session_desc_equals(pc.localDescription, pranswer); - assert_session_desc_equals(pc.pendingLocalDescription, pranswer); + assert_session_desc_similar(pc.localDescription, pranswer); + assert_session_desc_similar(pc.pendingLocalDescription, pranswer); assert_equals(pc.currentLocalDescription, null); assert_equals(pc.pendingRemoteDescription, null); @@ -152,11 +152,11 @@ .then(() => pc.setLocalDescription(answer)) .then(() => { assert_equals(pc.signalingState, 'stable'); - assert_session_desc_equals(pc.localDescription, answer); - assert_session_desc_equals(pc.remoteDescription, offer); + assert_session_desc_similar(pc.localDescription, answer); + assert_session_desc_similar(pc.remoteDescription, offer); - assert_session_desc_equals(pc.currentLocalDescription, answer); - assert_session_desc_equals(pc.currentRemoteDescription, offer); + assert_session_desc_similar(pc.currentLocalDescription, answer); + assert_session_desc_similar(pc.currentRemoteDescription, offer); assert_equals(pc.pendingLocalDescription, null); assert_equals(pc.pendingRemoteDescription, null); diff --git a/webrtc/RTCPeerConnection-setLocalDescription-rollback.html b/webrtc/RTCPeerConnection-setLocalDescription-rollback.html index 45ee0cc..0147b31 100644 --- a/webrtc/RTCPeerConnection-setLocalDescription-rollback.html +++ b/webrtc/RTCPeerConnection-setLocalDescription-rollback.html
@@ -11,7 +11,7 @@ // https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html // The following helper functions are called from RTCPeerConnection-helper.js: - // assert_session_desc_equals + // assert_session_desc_similar /* 4.3.2. Interface Definition
diff --git a/webrtc/RTCPeerConnection-setLocalDescription.html b/webrtc/RTCPeerConnection-setLocalDescription.html index 078a6ff..2a951eb 100644 --- a/webrtc/RTCPeerConnection-setLocalDescription.html +++ b/webrtc/RTCPeerConnection-setLocalDescription.html
@@ -12,8 +12,8 @@ // The following helper functions are called from RTCPeerConnection-helper.js: // generateOffer - // assert_session_desc_not_equals - // assert_session_desc_equals + // assert_session_desc_not_similar + // assert_session_desc_similar /* 4.3.2. Interface Definition @@ -63,12 +63,19 @@ pc.setLocalDescription(offer2) .then(() => { assert_equals(pc.signalingState, 'have-local-offer'); +<<<<<<< HEAD assert_session_desc_not_equals(offer1, offer2); assert_session_desc_equals(pc.localDescription, offer2); assert_session_desc_equals(pc.currentLocalDescription, offer1); assert_session_desc_equals(pc.pendingLocalDescription, offer2); assert_array_equals(states, ['have-local-offer', 'stable', 'have-local-offer']); +======= + assert_session_desc_not_similar(offer1, offer2); + assert_session_desc_similar(pc.localDescription, offer2); + assert_session_desc_similar(pc.currentLocalDescription, offer1); + assert_session_desc_similar(pc.pendingLocalDescription, offer2); +>>>>>>> s/assert_session_desc_(not_)equals/assert_session_desc_(not_)similar }))); }, 'Calling createOffer() and setLocalDescription() again after one round of local-offer/remote-answer should succeed'); @@ -89,9 +96,16 @@ pc.setLocalDescription(offer) .then(() => { assert_equals(pc.signalingState, 'have-local-offer'); +<<<<<<< HEAD assert_session_desc_equals(pc.localDescription, offer); assert_session_desc_equals(pc.currentLocalDescription, answer); assert_session_desc_equals(pc.pendingLocalDescription, offer); +======= + assert_session_desc_similar(pc.localDescription, offer); + assert_session_desc_similar(pc.currentLocalDescription, answer); + assert_session_desc_similar(pc.pendingLocalDescription, offer); + }))); +>>>>>>> s/assert_session_desc_(not_)equals/assert_session_desc_(not_)similar assert_array_equals(states, ['have-remote-offer', 'stable', 'have-local-offer']); }))); diff --git a/webrtc/RTCPeerConnection-setRemoteDescription-answer.html b/webrtc/RTCPeerConnection-setRemoteDescription-answer.html index 30c7e43..ff55447 100644 --- a/webrtc/RTCPeerConnection-setRemoteDescription-answer.html +++ b/webrtc/RTCPeerConnection-setRemoteDescription-answer.html
@@ -13,7 +13,7 @@ // The following helper functions are called from RTCPeerConnection-helper.js: // generateOffer() // generateAnswer() - // assert_session_desc_equals() + // assert_session_desc_similar() /* 4.3.2. Interface Definition @@ -73,11 +73,11 @@ .then(() => { assert_equals(pc.signalingState, 'stable'); - assert_session_desc_equals(pc.localDescription, offer); - assert_session_desc_equals(pc.remoteDescription, answer); + assert_session_desc_similar(pc.localDescription, offer); + assert_session_desc_similar(pc.remoteDescription, answer); - assert_session_desc_equals(pc.currentLocalDescription, offer); - assert_session_desc_equals(pc.currentRemoteDescription, answer); + assert_session_desc_similar(pc.currentLocalDescription, offer); + assert_session_desc_similar(pc.currentRemoteDescription, answer); assert_equals(pc.pendingLocalDescription, null); assert_equals(pc.pendingRemoteDescription, null); diff --git a/webrtc/RTCPeerConnection-setRemoteDescription-offer.html b/webrtc/RTCPeerConnection-setRemoteDescription-offer.html index ae6ee95..565fddc 100644 --- a/webrtc/RTCPeerConnection-setRemoteDescription-offer.html +++ b/webrtc/RTCPeerConnection-setRemoteDescription-offer.html
@@ -11,7 +11,7 @@ // https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html // The following helper functions are called from RTCPeerConnection-helper.js: - // assert_session_desc_equals() + // assert_session_desc_similar() /* 4.3.2. Interface Definition @@ -65,8 +65,8 @@ return pc2.setRemoteDescription(offer) .then(() => { assert_equals(pc2.signalingState, 'have-remote-offer'); - assert_session_desc_equals(pc2.remoteDescription, offer); - assert_session_desc_equals(pc2.pendingRemoteDescription, offer); + assert_session_desc_similar(pc2.remoteDescription, offer); + assert_session_desc_similar(pc2.pendingRemoteDescription, offer); assert_equals(pc2.currentRemoteDescription, null); assert_array_equals(states, ['have-remote-offer']); @@ -91,8 +91,8 @@ .then(() => pc2.setRemoteDescription(offer)) .then(() => { assert_equals(pc2.signalingState, 'have-remote-offer'); - assert_session_desc_equals(pc2.remoteDescription, offer); - assert_session_desc_equals(pc2.pendingRemoteDescription, offer); + assert_session_desc_similar(pc2.remoteDescription, offer); + assert_session_desc_similar(pc2.pendingRemoteDescription, offer); assert_equals(pc2.currentRemoteDescription, null); assert_array_equals(states, ['have-remote-offer']); @@ -117,14 +117,14 @@ .then(()=> { return pc1.createOffer({ offerToReceiveAudio: true }) .then(offer2 => { - assert_session_desc_not_equals(offer1, offer2); + assert_session_desc_not_similar(offer1, offer2); return pc2.setRemoteDescription(offer1) .then(() => pc2.setRemoteDescription(offer2)) .then(() => { assert_equals(pc2.signalingState, 'have-remote-offer'); - assert_session_desc_equals(pc2.remoteDescription, offer2); - assert_session_desc_equals(pc2.pendingRemoteDescription, offer2); + assert_session_desc_similar(pc2.remoteDescription, offer2); + assert_session_desc_similar(pc2.pendingRemoteDescription, offer2); assert_equals(pc2.currentRemoteDescription, null); assert_array_equals(states, ['have-remote-offer']); diff --git a/webrtc/RTCPeerConnection-setRemoteDescription-pranswer.html b/webrtc/RTCPeerConnection-setRemoteDescription-pranswer.html index d1073c8..9197a35 100644 --- a/webrtc/RTCPeerConnection-setRemoteDescription-pranswer.html +++ b/webrtc/RTCPeerConnection-setRemoteDescription-pranswer.html
@@ -13,7 +13,7 @@ // The following helper functions are called from RTCPeerConnection-helper.js: // generateOffer // generateAnswer - // assert_session_desc_equals + // assert_session_desc_similar /* 4.3.2. Interface Definition @@ -97,12 +97,12 @@ .then(() => { assert_equals(pc.signalingState, 'have-remote-pranswer'); - assert_session_desc_equals(pc.localDescription, offer); - assert_session_desc_equals(pc.pendingLocalDescription, offer); + assert_session_desc_similar(pc.localDescription, offer); + assert_session_desc_similar(pc.pendingLocalDescription, offer); assert_equals(pc.currentLocalDescription, null); - assert_session_desc_equals(pc.remoteDescription, pranswer); - assert_session_desc_equals(pc.pendingRemoteDescription, pranswer); + assert_session_desc_similar(pc.remoteDescription, pranswer); + assert_session_desc_similar(pc.pendingRemoteDescription, pranswer); assert_equals(pc.currentRemoteDescription, null); assert_array_equals(states, ['have-local-offer', 'have-remote-pranswer']); @@ -151,12 +151,12 @@ .then(() => { assert_equals(pc.signalingState, 'stable'); - assert_session_desc_equals(pc.localDescription, offer); - assert_session_desc_equals(pc.currentLocalDescription, offer); + assert_session_desc_similar(pc.localDescription, offer); + assert_session_desc_similar(pc.currentLocalDescription, offer); assert_equals(pc.pendingLocalDescription, null); - assert_session_desc_equals(pc.remoteDescription, answer); - assert_session_desc_equals(pc.currentRemoteDescription, answer); + assert_session_desc_similar(pc.remoteDescription, answer); + assert_session_desc_similar(pc.currentRemoteDescription, answer); assert_equals(pc.pendingRemoteDescription, null); assert_array_equals(states, ['have-local-offer', 'have-remote-pranswer', 'stable']); diff --git a/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html b/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html index f677723..01969dc 100644 --- a/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html +++ b/webrtc/RTCPeerConnection-setRemoteDescription-rollback.html
@@ -12,7 +12,7 @@ // The following helper functions are called from RTCPeerConnection-helper.js: // generateOffer - // assert_session_desc_equals + // assert_session_desc_similar /* 4.3.2. Interface Definition
diff --git a/webrtc/RTCPeerConnection-setRemoteDescription.html b/webrtc/RTCPeerConnection-setRemoteDescription.html index 1dbcf41..ad9cdff 100644 --- a/webrtc/RTCPeerConnection-setRemoteDescription.html +++ b/webrtc/RTCPeerConnection-setRemoteDescription.html
@@ -11,8 +11,8 @@ // https://w3c.github.io/webrtc-pc/archives/20170605/webrtc.html // The following helper functions are called from RTCPeerConnection-helper.js: - // assert_session_desc_not_equals() - // assert_session_desc_equals() + // assert_session_desc_not_similar() + // assert_session_desc_similar() /* 4.3.2. Interface Definition @@ -116,10 +116,10 @@ await pc.setLocalDescription(await pc.createAnswer()); const offer2 = await pc2.createOffer({ offerToReceiveVideo: true }); await pc.setRemoteDescription(offer2); - assert_session_desc_not_equals(offer1, offer2); - assert_session_desc_equals(pc.remoteDescription, offer2); - assert_session_desc_equals(pc.currentRemoteDescription, offer1); - assert_session_desc_equals(pc.pendingRemoteDescription, offer2); + assert_session_desc_not_similar(offer1, offer2); + assert_session_desc_similar(pc.remoteDescription, offer2); + assert_session_desc_similar(pc.currentRemoteDescription, offer1); + assert_session_desc_similar(pc.pendingRemoteDescription, offer2); }, 'Calling setRemoteDescription() again after one round of remote-offer/local-answer should succeed'); promise_test(async t => { @@ -136,8 +136,8 @@ await pc.setRemoteDescription(answer); await pc.setRemoteDescription(await pc2.createOffer()); assert_equals(pc.remoteDescription.sdp, pc.pendingRemoteDescription.sdp); - assert_session_desc_equals(pc.remoteDescription, offer); - assert_session_desc_equals(pc.currentRemoteDescription, answer); + assert_session_desc_similar(pc.remoteDescription, offer); + assert_session_desc_similar(pc.currentRemoteDescription, answer); }, 'Switching role from offerer to answerer after going back to stable state should succeed'); /*